ds_priority_delete_min

返回优先级最小的优先级队列中的值,并将其删除。

语法:

ds_priority_delete_min(id);


参数 描述
id 要使用的优先级队列的id。


返回: 实数或字符串


描述

此函数将返回队列中具有最低优先级的值,然后从数据结构中删除值(它的优先级也将消失)。如果多个值具有相同的优先级,则将删除第一个添加到此优先队列的值,但具有相同优先级的所有其他值仍将在队列中。


例如:

if ai_move
   {
   script_execute(ds_priority_delete_min(ai_priority));
   }

The above code checks an instance variable and if it returns true it will execute a script indexed in the priority queue with the lowest priority value and then remove that script from the queue.


上一页: DS Priority Queues
下一页: ds_priority_delete_value
© Copyright YoYo Games Ltd. 2018 All Rights Reserved